import java.util.Scanner;
public class Study11 {
	public static void main(String[] args) {
		
		Scanner cr=new Scanner(System.in);
		System.out.println("请输入第一个数字：");
		int num1=cr.nextInt();
		System.out.println("请输入第二个数字");
		int num2=cr.nextInt();
		System.out.println("*****微型计算器 ****\n"+
				"*****1、求和 ****\n"+
				"*****2、求差 ****\n"+
				"*****3、求积 ****\n"+
				"*****4、求商 ****\n"+
				"*****5、求余 ****\n"+
				"*****Q、退出 ****\n"+
				"*****请选择您想执行的操作 ****\n");
		char end=cr.next().charAt(0);
		switch (end){
			case'1':
				System.out.println("结果："+(num1+num2));
				break;
			case'2':
				System.out.println("结果："+(num1-num2));
				break;
			case'3':
				System.out.println("结果："+num1*num2);
				break;
			case'4':
				System.out.println("结果："+num1/num2);
				break;
			case'5':
				System.out.println("结果："+num1%num2);
				break;
			case'Q':
				System.out.println("退出");
				break;
			default:
				System.out.println("请正确输入执行代号。");
				break;
		}
	}
}
